package com.itheima.Array;
import java.util.Scanner;
public class ArrayIndex {
    public static void main(String[] args) {
        int[] arr = new int[]{12,45,12,12,45,67};
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你要输入的值:");
        int num = sc.nextInt();
        int index = -1;
        for (int i = 0; i < arr.length; i++) {
            if(num == arr[i]){
                index = i;
                System.out.println(index);
            }
        }

         }
    }

